
def subs(context, config)
  return true  unless config.key?(:key) && config.key?(:regexp) && config.key?(:to)

  key = config[:key].to_sym

  context.entries = context.entries.map do |entry|
    entry[key] = entry[key].gsub(config[:regexp], config[:to])
    entry
  end
end

